package com.task.controller;

import com.task.common.util.body.CommonModel;
import com.task.common.entity.sys.model.RegisterBody;
import com.task.service.RegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Huzz
 * @created 2021-11-30 18:17
 */
@Api(tags = "用户注册")
@RestController
public class RegisterController {

    @Autowired
    private RegisterService registerService;

    @ApiOperation("用户注册")
    @PostMapping("/register")
    public CommonModel register(@RequestBody RegisterBody user) {

        return registerService.register(user);
    }
}
